<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<!-- Mirrored from www.wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:43:02 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Generator" content="iWeb 3.0.4"/>
<meta name="iWeb-Build" content="local-build-20170103"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<meta name="viewport" content="width=770"/>
<title>wolfSSL - Docs | wolfCrypt Manual - Chapter 18.21 (RSA)</title>
<link rel="stylesheet" type="text/css" media="screen,print" href="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa.css"/>
<!--[if lt IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/Docs-wolfssl-manual-18-21-wolfcrypt-api-rsaIE.css'/><![endif]-->
<!--[if gte IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='Media/IE8.css'/><![endif]-->
<script type="text/javascript" src="Scripts/iWebSite.js"></script>
<script type="text/javascript" src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa.js"></script>
<meta name="description" content="wolfSSL - Docs | wolfCrypt Manual - Chapter 18.21 (RSA)"/><meta name="keywords" content="embedded ssl, ssl library, embedded security, openssl alternative, ssl api, ssl, tls, cyassl, openssl replacement, openssl api, ssl functions, small openssl, smart grid, connected home, ecc, lightweight ssl, suite b, encryption security software, ssl inspection"/><meta name="robots" content="follow,index"/> <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','../../www.google-analytics.com/analytics.js','ga');ga('create','UA-64826966-1','auto');ga('send','pageview');</script>
 
<script>//<![CDATA[
window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("../../assets.zendesk.com/embeddable_framework/main.js","wolfssl.zendesk.com");
//]]></script>
  </head>
<body style="background: rgb(255, 255, 255); margin: 0pt; " onload="onPageLoad();">
<div style="text-align: center; ">
<div style="margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; overflow: hidden; position: relative; word-wrap: break-word;  background: rgb(255, 255, 255); text-align: left; width: 770px; " id="body_content">
<div style="float: left; margin-left: 0px; position: relative; width: 770px; z-index: 0; " id="nav_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div style="clear: both; height: 0px; line-height: 0px; " class="spacer"> </div>
</div>
<div style="float: left; height: 0px; line-height: 0px; margin-left: 0px; position: relative; width: 770px; z-index: 10; " id="header_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
</div>
<div style="margin-left: 0px; position: relative; width: 770px; z-index: 5; " id="body_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id1" style="height: 38px; left: 375px; position: absolute; top: 157px; width: 361px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_361_38" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style">wolfSSL Manual</p>
</div>
</div>
</div>
<div id="id2" style="height: 24px; left: 193px; position: absolute; top: 122px; width: 268px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_268_24" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class1" title="Docs.html" href="Docs.html">Docs</a> <span class="style">-&gt;</span> <span class="style_1">wolfSSL Manual</span></p>
</div>
</div>
</div>
<div style="height: 1px; width: 698px;  height: 1px; left: 37px; position: absolute; top: 220px; width: 698px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 698px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_1.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 698px; "/>
</div>
</div>
<div style="height: 37px; width: 545px;  height: 37px; left: 191px; position: absolute; top: 80px; width: 545px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 545px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_2.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 545px; "/>
</div>
</div>
<div id="id3" style="height: 25px; left: 200px; position: absolute; top: 84px; width: 43px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_43_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_2"><a class="class2" title="Home.html" href="Home.html">Home</a></p>
</div>
</div>
</div>
<div id="id4" style="height: 25px; left: 365px; position: absolute; top: 84px; width: 72px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_72_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class3" title="https://wolfssl.com/wolfSSL/download/downloadForm.php" href="https://wolfssl.com/wolfSSL/download/downloadForm.php">Download</a></p>
</div>
</div>
</div>
<div id="id5" style="height: 25px; left: 439px; position: absolute; top: 84px; width: 59px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_59_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class4" title="License.html" href="License.html">License</a></p>
</div>
</div>
</div>
<div id="id6" style="height: 25px; left: 499px; position: absolute; top: 84px; width: 44px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_44_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class5" title="Blog/Blog.html" href="Blog/Blog.html">Blog</a></p>
</div>
</div>
</div>
<div id="id7" style="height: 25px; left: 589px; position: absolute; top: 84px; width: 80px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_80_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class6" title="Community.html" href="Community.html">Community</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 245px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_3.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 296px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_4.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 363px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_5.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 438px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_6.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 498px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_7.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 589px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_8.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id8" style="height: 25px; left: 671px; position: absolute; top: 84px; width: 61px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_61_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class7" title="Contact.html" href="Contact.html">Contact</a></p>
</div>
</div>
</div>
<div id="id9" style="height: 25px; left: 249px; position: absolute; top: 84px; width: 44px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_44_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_2"><a class="class8" title="About.html" href="About.html">About</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 670px; position: absolute; top: 81px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_9.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id10" style="height: 25px; left: 298px; position: absolute; top: 84px; width: 63px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_63_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_3"><a class="class9" title="Products.html" href="Products.html">Products</a></p>
</div>
</div>
</div>
<div id="id11" style="height: 25px; left: 549px; position: absolute; top: 84px; width: 41px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_41_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_2"><a class="class10" title="Docs.html" href="Docs.html">Docs</a></p>
</div>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 545px; position: absolute; top: 80px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_10.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id12" style="height: 27px; left: 634px; position: absolute; top: 224px; width: 102px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_102_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_4"><a class="class11" title="Docs-wolfssl-manual-18-22-wolfcrypt-api-sha.html" href="Docs-wolfssl-manual-18-22-wolfcrypt-api-sha.html">Next Chapter</a></p>
</div>
</div>
</div>
<div id="id13" style="height: 25px; left: 35px; position: absolute; top: 224px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_5"><a class="class12" title="Docs-wolfssl-manual-18-20-wolfcrypt-api-ripemd.html" href="Docs-wolfssl-manual-18-20-wolfcrypt-api-ripemd.html">Previous Chapter</a></p>
</div>
</div>
</div>
<div style="height: 22px; width: 22px;  height: 22px; left: 33px; position: absolute; top: 191px; width: 22px; z-index: 1; " class="tinyText style_SkipStroke_2">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/PDF.png" alt="" style="border: none; height: 22px; width: 22px; "/>
</div>
<div id="id14" style="height: 25px; left: 323px; position: absolute; top: 224px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_6"><a title="Docs-wolfssl-manual-toc.html" href="Docs-wolfssl-manual-toc.html">Table of Contents</a></p>
</div>
</div>
</div>
<div id="id15" style="height: 7588px; left: 35px; position: absolute; top: 281px; width: 701px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_701_7588" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-top: 0pt; " class="paragraph_style_7">Chapter 18: wolfCrypt API Reference<br/></p>
<p class="paragraph_style_7"><br/></p>
<p class="paragraph_style_8">18.21  RSA<br/></p>
<p class="paragraph_style_8"><br/></p>
<p class="paragraph_style_9">The functions in this section expose RSA functionality to calling applications.<span class="style_2"><br/></span></p>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_11.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_10"><br/></p>
<p class="paragraph_style_11"><br/></p>
<p class="paragraph_style_12">wc_InitRsaKey<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int wc_InitRsaKey(RsaKey* key, void* heap);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This function initializes a provided RsaKey struct. It also takes in a heap identifier, for use with user defined memory overrides (see XMALLOC, XFREE, XREALLOC). <br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">0</span>: Returned upon successfully initializing the RSA structure for use with encryption and decryption<br/></p>
<p class="paragraph_style_9"><span class="style_3">BAD_FUNC_ARGS</span>: Returned if the RSA key pointer evaluates to NULL<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">key</span> - pointer to the RsaKey structure to initialize<br/></p>
<p class="paragraph_style_9"><span class="style_3">heap</span> - pointer to a heap identifier, for use with memory overrides, allowing custom handling of memory allocation. This heap will be the default used when allocating memory for use with this RSA object<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">RsaKey enc;<br/></p>
<p class="paragraph_style_14">int ret;<br/></p>
<p class="paragraph_style_14">ret = wc_RsaInitKey(&amp;enc, NULL); // not using heap hint. No custom memory<br/></p>
<p class="paragraph_style_14">if ( ret != 0 ) {<br/></p>
<p class="paragraph_style_14">// error initializing RSA key<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaInitCavium, wc_FreeRsaKey<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_12.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_15"> <br/></p>
<p class="paragraph_style_15"><span class="style_3">wc_FreeRsaKey</span><br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int wc_FreeRsaKey(RsaKey* key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This function frees a provided RsaKey struct using mp_clear.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">0</span>: Returned upon successfully freeing the key<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">key</span> - pointer to the RsaKey structure to free<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example: <br/></p>
<p class="paragraph_style_14">RsaKey enc;<br/></p>
<p class="paragraph_style_14">wc_RsaInitKey(&amp;enc, NULL); // not using heap hint. No custom memory<br/></p>
<p class="paragraph_style_14">... set key, do encryption<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">wc_FreeRsaKey(&amp;enc);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_InitRsaKey<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_13.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaPrivateKeyDecode<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int wc_RsaPrivateKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key, word32 inSz);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This function parses a DER-formatted RSA private key, extracts the private key and stores it in the given RsaKey structure. It also sets the distance parsed in idx. <br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">0</span>: Returned upon successfully parsing the private key from the DER encoded input<br/></p>
<p class="paragraph_style_9"><span class="style_3">ASN_PARSE_E</span>: Returned if there is an error parsing the private key from the input buffer. This may happen if the input private key is not properly formatted according to ASN.1 standards<br/></p>
<p class="paragraph_style_9"><span class="style_3">ASN_RSA_KEY_E</span>: Returned if there is an error reading the private key elements of the RSA key input<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">input</span> - pointer to the buffer containing the DER formatted private key to decode<br/></p>
<p class="paragraph_style_9"><span class="style_3">inOutIdx</span> - pointer to the index in the buffer at which the key begins (usually 0). As a side effect of this function, inOutIdx will store the distance parsed through the input buffer<br/></p>
<p class="paragraph_style_9"><span class="style_3">key</span> - pointer to the RsaKey structure in which to store the decoded private key<br/></p>
<p class="paragraph_style_9"><span class="style_3">inSz</span> - size of the input buffer<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">RsaKey enc;<br/></p>
<p class="paragraph_style_14">word32 idx = 0;<br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">byte der[] = { /* initialize with DER-encoded RSA private key */ };<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">wc_InitRsaKey(&amp;enc, NULL); // not using heap hint. No custom memory<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = wc_RsaPrivateKeyDecode(der, &amp;idx, &amp;enc, sizeof(der));<br/></p>
<p class="paragraph_style_14">if( ret != 0 ) {<br/></p>
<p class="paragraph_style_14">// error parsing private key <br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaPublicKeyDecode, wc_MakeRsaKey<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_14.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaPublicKeyDecode<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int wc_RsaPublicKeyDecode(const byte* input, word32* inOutIdx, RsaKey* key, word32 inSz);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This function parses a DER-formatted RSA public key, extracts the public key and stores it in the given RsaKey structure. It also sets the distance parsed in idx. <br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">0</span>: Returned upon successfully parsing the public key from the DER encoded input<br/></p>
<p class="paragraph_style_9"><span class="style_3">ASN_PARSE_E</span>: Returned if there is an error parsing the public key from the input buffer. This may happen if the input public key is not properly formatted according to ASN.1 standards<br/></p>
<p class="paragraph_style_9"><span class="style_3">ASN_OBJECT_ID_E</span>: Returned if the ASN.1 Object ID does not match that of a RSA public key<br/></p>
<p class="paragraph_style_9"><span class="style_3">ASN_EXPECT_0_E</span>: Returned if the input key is not correctly formatted according to ASN.1 standards<br/></p>
<p class="paragraph_style_9"><span class="style_3">ASN_BITSTR_E</span>:  Returned if the input key is not correctly formatted according to ASN.1 standards <br/></p>
<p class="paragraph_style_9"><span class="style_3">ASN_RSA_KEY_E</span>: Returned if there is an error reading the public key elements of the RSA key input<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">input</span> - pointer to the buffer containing the input DER-encoded RSA public key to decode<br/></p>
<p class="paragraph_style_9"><span class="style_3">inOutIdx</span> - pointer to the index in the buffer at which the key begins (usually 0). As a side effect of this function, inOutIdx will store the distance parsed through the input buffer<br/></p>
<p class="paragraph_style_9"><span class="style_3">key</span> - pointer to the RsaKey structure in which to store the decoded public key<br/></p>
<p class="paragraph_style_9"><span class="style_3">inSz</span> - size of the input buffer<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">RsaKey pub;<br/></p>
<p class="paragraph_style_14">word32 idx = 0;<br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">byte der[] = { /* initialize with DER-encoded RSA public key */ };<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">wc_InitRsaKey(&amp;pub, NULL); // not using heap hint. No custom memory<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = wc_RsaPublicKeyDecode(der, &amp;idx, &amp;pub, sizeof(der));<br/></p>
<p class="paragraph_style_14">if( ret != 0 ) {<br/></p>
<p class="paragraph_style_14">// error parsing public key <br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaPublicKeyDecodeRaw<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_15.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaPublicKeyDecodeRaw<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, const byte* e, word32 eSz, <br/></p>
<p class="paragraph_style_9">RsaKey* key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This function decodes the raw elements of an RSA public key, taking in the public modulus (n) and exponent (e). It stores these raw elements in the provided RsaKey structure, allowing one to use them in the encryption/decryption process.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">0</span>: Returned upon successfully decoding the raw elements of the public key into the RsaKey structure<br/></p>
<p class="paragraph_style_9"><span class="style_3">BAD_FUNC_ARG</span>: Returned if any of the input arguments evaluates to NULL<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_INIT_E</span>: Returned if there is an error initializing an integer for use with the multiple precision integer (mp_int) library<br/></p>
<p class="paragraph_style_9"><span class="style_3">ASN_GETINT_E</span>: Returned if there is an error reading one of the provided RSA key elements, n or e<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">n</span> - pointer to a buffer containing the raw modulus parameter of the public RSA key<br/></p>
<p class="paragraph_style_9"><span class="style_3">nSz</span> - size of the buffer containing n<br/></p>
<p class="paragraph_style_9"><span class="style_3">e</span> - pointer to a buffer containing the raw exponent parameter of the public RSA key<br/></p>
<p class="paragraph_style_9"><span class="style_3">eSz</span> - size of the buffer containing e<br/></p>
<p class="paragraph_style_9"><span class="style_3">key</span> - pointer to the RsaKey struct to initialize with the provided public key elements<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">RsaKey pub;<br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">byte n[] = { /* initialize with received n component of public key */ };<br/></p>
<p class="paragraph_style_14">byte e[] = { /* initialize with received e component of public key */ };<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">wc_InitRsaKey(&amp;pub, NULL); // not using heap hint. No custom memory<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = wc_RsaPublicKeyDecodeRaw(n, sizeof(n), e, sizeof(e), &amp;pub);<br/></p>
<p class="paragraph_style_14">if( ret != 0 ) {<br/></p>
<p class="paragraph_style_14">// error parsing public key elements<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaPublicKeyDecode<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_16.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_MakeRsaKey<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int wc_MakeRsaKey(RsaKey* key, int size, long e, RNG* rng);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This function generates a RSA private key of length size (in bits) and given exponent (e). It then stores this key in the provided RsaKey structure, so that it may be used for encryption/decryption. A secure number to use for e is 65537. size is required to be greater than RSA_MIN_SIZE and less than RSA_MAX_SIZE.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">For this function to be available, the option WOLFSSL_KEY_GEN must be enabled at compile time. This can be accomplished with --enable-keygen if using ./configure.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values<br/></p>
<p class="paragraph_style_9"><span class="style_3">0</span>: Returned upon successfully generating a RSA private key<br/></p>
<p class="paragraph_style_9"><span class="style_3">BAD_FUNC_ARG</span>: Returned if any of the input arguments are NULL, the size parameter falls outside of the necessary bounds, or e is incorrectly chosen<br/></p>
<p class="paragraph_style_9"><span class="style_3">RNG_FAILURE_E</span>: Returned if there is an error generating a random block using the provided RNG structure<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_INIT_E</span>, <span class="style_3">MP_READ_E</span>, <span class="style_3">MP_CMP_E</span>, <span class="style_3">MP_INVMOD_E</span>, <span class="style_3">MP_EXPTMOD_E</span>, <span class="style_3">MP_MOD_E</span>, <span class="style_3">MP_MUL_E</span>, <span class="style_3">MP_ADD_E</span>, <span class="style_3">MP_MULMOD_E</span>, <span class="style_3">MP_TO_E</span>, <span class="style_3">MP_MEM</span>,  and <span class="style_3">MP_ZERO_E</span>: May be returned if there is an error in the math library used while generating the RSA key<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">key</span>- pointer to the RsaKey structure in which to store the generated private key<br/></p>
<p class="paragraph_style_9"><span class="style_3">size</span> - desired keylenth, in bits. Required to be greater than RSA_MIN_SIZE and less than RSA_MAX_SIZE<br/></p>
<p class="paragraph_style_9"><span class="style_3">e</span> - exponent parameter to use for generating the key. A secure choice is 65537<br/></p>
<p class="paragraph_style_9"><span class="style_3">rng</span> - pointer to an RNG structure to use for random number generation while making the key<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">RsaKey priv;<br/></p>
<p class="paragraph_style_14">RNG rng;<br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">long e = 65537; // standard value to use for exponent<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">wc_InitRsaKey(&amp;priv, NULL); // not using heap hint. No custom memory<br/></p>
<p class="paragraph_style_14">wc_InitRng(&amp;rng);<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = wc_MakeRsaKey(&amp;key, 2048, e, &amp;rng); // generate 2048 bit long private key<br/></p>
<p class="paragraph_style_14">if( ret != 0 ) {<br/></p>
<p class="paragraph_style_14">// error generating private key<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_17.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaPublicEncrypt<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int wc_RsaPublicEncrypt(const byte* in, word32 inLen, byte* out, word32 outLen,<br/></p>
<p class="paragraph_style_9">                 RsaKey* key, RNG* rng);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This function encrypts a message from in and stores the result in out. It requires an initialized public key and a random number generator. As a side effect, this function will return the bytes written to out in outLen.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9">Upon successfully encrypting the input message, returns the<span class="style_3"> number bytes written</span> to out<br/></p>
<p class="paragraph_style_9"><span class="style_3">-1</span>: Returned if there is an error during RSA encryption and hardware acceleration via Cavium is enabled<br/></p>
<p class="paragraph_style_9"><span class="style_3">BAD_FUNC_ARG</span>: Returned if any of the input parameters are invalid<br/></p>
<p class="paragraph_style_9"><span class="style_3">RSA_BUFFER_E</span>: Returned if the output buffer is too small to store the ciphertext<br/></p>
<p class="paragraph_style_9"><span class="style_3">RNG_FAILURE_E</span>: Returned if there is an error generating a random block using the provided RNG structure<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_INIT_E</span>, <span class="style_3">MP_READ_E</span>, <span class="style_3">MP_CMP_E</span>, <span class="style_3">MP_INVMOD_E</span>, <span class="style_3">MP_EXPTMOD_E</span>, <span class="style_3">MP_MOD_E</span>, <span class="style_3">MP_MUL_E</span>, <span class="style_3">MP_ADD_E</span>, <span class="style_3">MP_MULMOD_E</span>, <span class="style_3">MP_TO_E</span>, <span class="style_3">MP_MEM</span>,  and <span class="style_3">MP_ZERO_E</span>: May be returned if there is an error in the math library used while encrypting the message<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">in</span> - pointer to a buffer containing the input message to encrypt<br/></p>
<p class="paragraph_style_9"><span class="style_3">inLen</span> - the length of the message to encrypt<br/></p>
<p class="paragraph_style_9"><span class="style_3">out</span> - pointer to the buffer in which to store the output ciphertext<br/></p>
<p class="paragraph_style_9"><span class="style_3">outLen</span> - the length of the output buffer<br/></p>
<p class="paragraph_style_9"><span class="style_3">key</span> - pointer to the RsaKey structure containing the public key to use for encryption<br/></p>
<p class="paragraph_style_9"><span class="style_3">rng</span> - The RNG structure with which to generate random block padding<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_14">RsaKey pub;<br/></p>
<p class="paragraph_style_14">int ret = 0;<br/></p>
<p class="paragraph_style_14">byte n[] = { /* initialize with received n component of public key */ };<br/></p>
<p class="paragraph_style_14">byte e[] = { /* initialize with received e component of public key */ };<br/></p>
<p class="paragraph_style_14">byte msg[] = { /* initialize with plaintext of message to encrypt */ };<br/></p>
<p class="paragraph_style_14">byte cipher[256]; // 256 bytes is large enough to store 2048 bit RSA ciphertext<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">wc_InitRsaKey(&amp;pub, NULL); // not using heap hint. No custom memory<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">wc_RsaPublicKeyDecodeRaw(n, sizeof(n), e, sizeof(e), &amp;pub);<br/></p>
<p class="paragraph_style_14">// initialize with received public key parameters<br/></p>
<p class="paragraph_style_14"><br/></p>
<p class="paragraph_style_14">ret = wc_RsaPublicEncrypt(msg, sizeof(msg), out, sizeof(out), &amp;pub, &amp;rng);<br/></p>
<p class="paragraph_style_14">if ( ret != 0 ) {<br/></p>
<p class="paragraph_style_14">// error encrypting message<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaPrivateDecrypt<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_18.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaPrivateDecryptInline<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int  wc_RsaPrivateDecryptInline(byte* in, word32 inLen, byte** out,RsaKey* key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This functions is utilized by the wc_RsaPrivateDecrypt function for decrypting.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">RSA_PAD_E</span>: RsaUnPad error, bad formatting<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9"><span class="style_3">Length</span> of decrypted data.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">in </span>- The byte array to be decrypted.<br/></p>
<p class="paragraph_style_9"><span class="style_3">inLen </span>- The length of in.<br/></p>
<p class="paragraph_style_9"><span class="style_3">out </span>- The byte array for the decrypted data to be stored.<br/></p>
<p class="paragraph_style_9"><span class="style_3">key </span>- The key to use for decryption.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaPrivateDecrypt<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_19.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12">wc_RsaPrivateDecrypt<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int  wc_RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out,word32 outLen, RsaKey* key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">This functions provides private RSA decryption.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MEMORY_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">BAD_FUNC_ARG</span>:<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9"><span class="style_3">length</span> of decrypted data.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">in </span>- The byte array to be decrypted.<br/></p>
<p class="paragraph_style_9"><span class="style_3">inLen </span>- The length of in.<br/></p>
<p class="paragraph_style_9"><span class="style_3">out </span>- The byte array for the decrypted data to be stored.<br/></p>
<p class="paragraph_style_9"><span class="style_3">outLen </span>- The length of out.<br/></p>
<p class="paragraph_style_9"><span class="style_3">key </span>- The key to use for decryption.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">ret = wc_RsaPublicEncrypt(in, inLen, out, sizeof(out), &amp;key, &amp;rng);<br/></p>
<p class="paragraph_style_14">    if (ret &lt; 0) {<br/></p>
<p class="paragraph_style_14">        return -1;<br/></p>
<p class="paragraph_style_14">    }<br/></p>
<p class="paragraph_style_14">    ret = wc_RsaPrivateDecrypt(out, ret, plain, sizeof(plain), &amp;key);<br/></p>
<p class="paragraph_style_14">    if (ret &lt; 0) {<br/></p>
<p class="paragraph_style_14">        return -1;<br/></p>
<p class="paragraph_style_14">    }<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">RsaUnPad<br/></p>
<p class="paragraph_style_9">wc_RsaFunction<br/></p>
<p class="paragraph_style_9">wc_RsaPrivateDecryptInline<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_20.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12">wc_RsaSSL_Sign<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int  wc_RsaSSL_Sign(const byte* in, word32 inLen, byte* out,word32 outLen, RsaKey* key, RNG* rng);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">Signs the provided array with the private key. <br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">RSA_BUFFER_E</span> upon error, otherwise 0 upon success<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">in</span>- The byte array to be decrypted.<br/></p>
<p class="paragraph_style_9"><span class="style_3">inLen </span>- The length of in.<br/></p>
<p class="paragraph_style_9"><span class="style_3">out </span>- The byte array for the decrypted data to be stored.<br/></p>
<p class="paragraph_style_9"><span class="style_3">outLen </span>- The length of out.<br/></p>
<p class="paragraph_style_9"><span class="style_3">key </span>- The key to use for decryption.<br/></p>
<p class="paragraph_style_9"><span class="style_3">RNG </span>- The RNG struct to use for random number purposes.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">ret = wc_RsaSSL_Sign(in, inLen, out, sizeof(out), &amp;key, &amp;rng);<br/></p>
<p class="paragraph_style_14">if (ret &lt; 0) {<br/></p>
<p class="paragraph_style_14">    return -1;<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_14">memset(plain, 0, sizeof(plain));<br/></p>
<p class="paragraph_style_14">ret = wc_RsaSSL_Verify(out, ret, plain, sizeof(plain), &amp;key);<br/></p>
<p class="paragraph_style_14">if (ret &lt; 0) {<br/></p>
<p class="paragraph_style_14">    return -1;<br/></p>
<p class="paragraph_style_14">}<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaPad<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_21.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaSSL_Verify<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int  wc_RsaSSL_Verify(const byte* in, word32 inLen, byte* out,word32 outLen, RsaKey* key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">Used to verify that the message was signed by key.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MEMORY_E</span>: memory exception.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9"><span class="style_3">Length</span> of text on no error.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">in </span>- The byte array to be decrypted.<br/></p>
<p class="paragraph_style_9"><span class="style_3">inLen </span>- The length of in.<br/></p>
<p class="paragraph_style_9"><span class="style_3">out </span>- The byte array for the decrypted data to be stored.<br/></p>
<p class="paragraph_style_9"><span class="style_3">outLen </span>- The length of out.<br/></p>
<p class="paragraph_style_9"><span class="style_3">key </span>- The key to use for verification.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">    ret = wc_RsaSSL_Sign(in, inLen, out, sizeof(out), &amp;key, &amp;rng);<br/></p>
<p class="paragraph_style_14">    if (ret &lt; 0) {<br/></p>
<p class="paragraph_style_14">        return -1;<br/></p>
<p class="paragraph_style_14">    }<br/></p>
<p class="paragraph_style_14">    memset(plain, 0, sizeof(plain));<br/></p>
<p class="paragraph_style_14">    ret = wc_RsaSSL_Verify(out, ret, plain, sizeof(plain), &amp;key);<br/></p>
<p class="paragraph_style_14">    if (ret &lt; 0) {<br/></p>
<p class="paragraph_style_14">        return -1;<br/></p>
<p class="paragraph_style_14">    }<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaSSL_Sign<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_22.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaEncryptSize<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int  wc_RsaEncryptSize(RsaKey* key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">Returns the encryption size for the provided key structure.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9">Encryption <span class="style_3">size</span> for the provided key structure.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">key </span>- The key to use for verification.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">int sz = wc_RsaEncryptSize(&amp;key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_13"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_23.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaFlattenPublicKey<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int  wc_RsaFlattenPublicKey(RsaKey*, byte*, word32*, byte*,word32*);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">flatten RsaKey structure into individual elements (e, n)<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">BAD_FUNC_ARG</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">SA_BUFFER_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_INIT_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_READ_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_CMP_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_INVMOD_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_EXPTMOD_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_MOD_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_MUL_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_ADD_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_MULMOD_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_TO_E</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">MP_MEM</span>:<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">key </span>- The key to use for verification.<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_24.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaInitCavium<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int  wc_RsaInitCavium(RsaKey*, int devId);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">Initialization of RsaKey struct for use with Nitrox devices.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">0</span>: success<br/></p>
<p class="paragraph_style_9"><span class="style_3">-1</span>: error<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">key </span>- The key to use for verification.<br/></p>
<p class="paragraph_style_9"><span class="style_3">devId </span>- device ID<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_9">wc_RsaFreeCavium<br/></p>
<p class="paragraph_style_9"><br/></p>
<div class="paragraph paragraph_style_9"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_25.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_12"><br/></p>
<p class="paragraph_style_12">wc_RsaFreeCavium<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Synopsis:<br/></p>
<p class="paragraph_style_9">#include &lt;wolfssl/wolfcrypt/rsa.h&gt;<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_9">int  wc_RsaFreeCavium(RsaKey* key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Description:<br/></p>
<p class="paragraph_style_9">Frees the key for use with Nitrox devices.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Return Values:<br/></p>
<p class="paragraph_style_9"><span class="style_3">BAD_FUNC_ARG</span>:<br/></p>
<p class="paragraph_style_9"><span class="style_3">0</span>: Success<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Parameters:<br/></p>
<p class="paragraph_style_9"><span class="style_3">key </span>- The key to free.<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">Example:<br/></p>
<p class="paragraph_style_14">wc_RsaFreeCavium(&amp;key);<br/></p>
<p class="paragraph_style_9"><br/></p>
<p class="paragraph_style_13">See Also:<br/></p>
<p class="paragraph_style_10">wc_RsaInitCavium<br/></p>
<p class="paragraph_style_10"><br/></p>
<div class="paragraph paragraph_style_10"><div style="height: 1px; width: 693px;  height: 1px; left: 0px; position: relative; top: 1px; width: 693px; " class="tinyText inline-block"><div style="position: relative; width: 693px; "><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_26.jpg" alt="" style="height: 1px; left: 0px; position: absolute; top: 0px; width: 693px; "/></div></div><br/></div>
</div>
<div style="clear: both; height: 0px; line-height: 0px; " class="tinyText"> </div>
</div>
</div>
<div style="height: 16px; width: 20px;  height: 16px; left: 706px; position: absolute; top: 51px; width: 20px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 20px; ">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/shapeimage_27.png" alt="" style="height: 16px; left: 0px; position: absolute; top: 0px; width: 20px; "/>
</div>
</div>
<div style="height: 19px; width: 19px;  height: 19px; left: 707px; position: absolute; top: 25px; width: 19px; z-index: 1; " class="tinyText style_SkipStroke_2">
<img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/United%20Kingdom(Great%20Britain).png" alt="" style="border: none; height: 19px; width: 19px; "/>
</div>
<div id="id16" style="height: 23px; left: 328px; position: absolute; top: 48px; width: 258px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_258_23" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_16">Questions? +1 (425) 245-8247</p>
</div>
</div>
</div>
<div style="height: 19px; width: 19px;  height: 19px; left: 685px; position: absolute; top: 25px; width: 19px; z-index: 1; " class="tinyText style_SkipStroke_2">
<a href="http://www.wolfssl.jp/" title="http://www.wolfssl.jp"><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/japan.png" alt="" style="border: none; height: 19px; width: 19px; "/></a>
</div>
<div id="id17" style="height: 28px; left: 593px; position: absolute; top: 44px; width: 119px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_119_28" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_17"><a class="class13" title="https://www.wolfssl.com/forums" href="https://www.wolfssl.com/forums">Support <span class="style_4">Forums</span></a></p>
</div>
</div>
</div>
<div id="id18" style="height: 27px; left: 59px; position: absolute; top: 190px; width: 342px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_342_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_18"><a class="class14" title="https://www.wolfssl.com/documentation/wolfSSL-Manual.pdf" href="https://www.wolfssl.com/documentation/wolfSSL-Manual.pdf">Download wolfSSL Manual (PDF)</a></p>
</div>
</div>
</div>
<div style="height: 121px; width: 155px;  height: 121px; left: 32px; position: absolute; top: 5px; width: 155px; z-index: 1; " class="tinyText style_SkipStroke_2">
<a href="Home.html" title="Home.html"><img src="Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa_files/wolfssl_logo.png" alt="" style="border: none; height: 121px; width: 156px; "/></a>
</div>
<div style="height: 7869px; line-height: 7869px; " class="spacer"> </div>
</div>
<div style="height: 114px; margin-left: 0px; position: relative; width: 770px; z-index: 15; " id="footer_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div id="id19" style="height: 27px; left: 634px; position: absolute; top: 47px; width: 102px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_102_27" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_4"><a class="class15" title="Docs-wolfssl-manual-18-22-wolfcrypt-api-sha.html" href="Docs-wolfssl-manual-18-22-wolfcrypt-api-sha.html">Next Chapter</a></p>
</div>
</div>
</div>
<div id="id20" style="height: 25px; left: 35px; position: absolute; top: 47px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_19"><a class="class16" title="Docs-wolfssl-manual-18-20-wolfcrypt-api-ripemd.html" href="Docs-wolfssl-manual-18-20-wolfcrypt-api-ripemd.html">Previous Chapter</a></p>
</div>
</div>
</div>
<div id="id21" style="height: 25px; left: 323px; position: absolute; top: 47px; width: 125px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_125_25" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_6"><a class="class17" title="Docs-wolfssl-manual-toc.html" href="Docs-wolfssl-manual-toc.html">Table of Contents</a></p>
</div>
</div>
</div>
<div id="id22" style="height: 29px; left: 35px; position: absolute; top: 85px; width: 701px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_701_29" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_20">Copyright 2017 wolfSSL Inc.  All rights reserved.</p>
</div>
</div>
</div>
</div>
</div>
</div>
 </body>

<!-- Mirrored from www.wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-21-wolfcrypt-api-rsa.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:43:18 GMT -->
</html>
